package omit.wage.controller;


import lombok.extern.slf4j.Slf4j;
import omit.wage.result.Result;
import omit.wage.dto.AdminRegisterDTO;
import omit.wage.service.IAdministratorRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import org.springframework.web.bind.annotation.RestController;

import java.io.Serializable;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-06-11
 */
@Slf4j
@RestController
public class AdminRegisterController implements Serializable {
    @Autowired
    private IAdministratorRegisterService iAdministratorRegisterService;

    @PostMapping("/register")
    public Result register(@RequestBody AdminRegisterDTO adminRegisterDTO){
        log.info("管理员注册{}");
        //调用service层添加注册功能
        iAdministratorRegisterService.register(adminRegisterDTO);
        //响应
        return Result.success();
    }
}
